<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<body th:fragment="table">
<table id="topdatagrid"
       style="width: 100%; height: 100%"
       data-options="url:'http://localhost:3333/user/list',fitColumns:true,pagination:true,rownumbers:true">
    <thead>
    <tr>
        <th data-options="field:'deptName',width:100">部门名称</th>
        <th data-options="field:'name',width:100">名称</th>
        <th data-options="field:'id',checkbox:false,width:100,formatter:fmtOpt">操作</th>
    </tr>
    </thead>
</table>
<script type="text/javascript">
    // 显示操作
    function fmtOpt(value,row,index){
        var opt='<a href="javascript:openTabsByUrl(\'编辑员工信息\',\'/user/edit/'+value+'\')">编辑</a>';
        opt=opt+'&nbsp;&nbsp;<a href="javascript:showRowTab(\'查询员工详情\',\''+value+'\')">详情</a>';
        opt=opt+'&nbsp;&nbsp;<a href="javascript:removeRow(\''+value+'\')">删除</a>';
        return opt;
    }
</script>
</body>
</html>